package pojo;

import java.beans.Transient;
import java.util.Calendar;
import java.util.Date;

public class Visitor {

    private Integer id;
    private String email;
    private String password;
    private int status = 0;
    private Date registerTime;
    private String code;
    private String content;

    public Visitor() {
    }

    public Visitor(String email, String password) {
        this.email = email;
        this.password = password;
    }

    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Transient
    public Date getLastActivateTime() {
        Calendar cl = Calendar.getInstance();
        cl.setTime(this.getRegisterTime());
        cl.add(cl.DATE, 2);

        return cl.getTime();
    }
}
